﻿<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
</head>

<body>
    <div id="header">
        <h1>
            <a href="/"><img alt="Logo" src= "../../Content/Images/logo.png" /></a>            
        </h1>

        <ul id="navlist">
            <li class="first">
                    <a href="@Url.Content("~")" id="current">Kezdőoldal</a>
            </li>
            <li>@{Html.RenderAction("CartSummary", "ShoppingCart");}</li>
            @if(!User.Identity.IsAuthenticated)
            {
                <li><a href="@Url.Content("~/Account/LogOn")">Bejelentkezés/Regisztráció</a></li>
            }
            else{
                
                if(User.IsInRole("Admin"))
                {
                    <li><a href="@Url.Content("~/StoreManager/")">Termékek</a></li>
                    <li><a href="@Url.Content("~/Account/Orders")">Rendelések</a></li>
                }

                if (User.IsInRole("User"))
                {
                    <li><a href="@Url.Content("~/Account/Orders")">Korábbi rendelések</a></li>
                }
                <li><a href="@Url.Content("~/Account/ChangePassword")">Jelszóváltoztatás</a></li>
                <li><a href="@Url.Content("~/Account/LogOff")">Kijelentkezés</a></li>
            }
        </ul>        
    </div>
        @{Html.RenderAction("CategoryMenu", "Store");}
    <div id="main">
        @RenderBody()
    </div>
    <div id="footer">
        ASP.NET Project 2011 by Karacs Anita, Pálfi Gyula Viktor, Spórás László
    </div>
</body>
</html>